Messaging is a generic term referring to protocols which enable communication between software components or applications. Conventional messaging enables distributed communication that is loosely coupled, since messaging clients (i.e., message producers and message consumers) are not required to possess any knowledge of one another. Rather, such producers and consumers need only be aware of agreed destinations and messaging formats. Consequently, a messaging client can send messages to, and receive messages from, any other messaging client.
Messaging protocols include queue-based protocols, topic-based publish/subscribe protocols, and messaging bus-based protocols. Queue and topic-based protocols link message producers and message consumers using queue names or topic names. FIG. 1A illustrates system 10 including two message channels which provide communication between producers 11, 12 and consumers 21-23 using, respectively, queue and topic-based protocols. Queue 15 enforces a one-to-one relationship between message producer 11 and message consumer 21. Accordingly, once a message is received at queue 15 and transmitted to consumer 21, that message becomes unavailable to any other consumer.
A topic-based protocol, on the other hand, implies a one-to-many relationship between a message producer and message consumers. For example, a message transmitted by message producer 12 and associated with topic 17 is delivered to message consumers 22 and 23, both of whom are associated with topic 17 (e.g., through a registration/subscription process). According to the protocols illustrated in FIG. 1A, a queue name or a topic name provides the only indication of a semantic relationship between a producer of a message and its consumer(s). No semantic relationships are defined between producers or between consumers. Accordingly, each queue- or topic-based message channel exists as a substantially independent entity, even though logical relationships may exist between producers and/or consumers of the message channels.
A message bus-based protocol, such as Model-View-Controller, may utilize a central component to route messages between producers and consumers. FIG. 1B illustrates system 50 implementing such a protocol, wherein dispatcher 60 uses routing table 65 to route messages between producers 70 and consumers 80. For example, routing table 65 may associate event ids with one or more consumers. A producer 70 may publish an event along with an event id, and dispatcher 60 may determine the consumers 80 which are associated with the event id in routing table 65 and transmit the event to those consumers 80.
As described with respect to system 10, system 50 also falls short of effectively defining semantic relationships between producers, between consumers, between producers and consumers, and between message channels (e.g., represented by individual event ids). In view of the foregoing, what is needed is a messaging system to efficiently model semantic relationships among message producers and message consumers. Such a system may enable the application of semantically-meaningful routing and filtering algorithms to efficiently leverage these modeled relationships.